<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/20 0020
 * Time: 16:28
 */

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Repositories\Admin\FeedbackRepository;

class FeedbackController extends Controller
{
    protected $feedbackRepository;
    public function __construct(FeedbackRepository $feedbackRepository)
    {
        $this->feedbackRepository = $feedbackRepository;
    }
    /**
     * index
     */
    public function index(){
        $feedbackUserList = $this->feedbackRepository->getFeedbackUserList();
        if($feedbackUserList)
            return json_encode(['code'=>200,'feedbackUserList'=>$feedbackUserList->toArray()]);
        else
            return json_encode(['code'=>400,'msg'=>'获取反馈信息用户列表失败']);
    }
}